import request from '@/utils/request';

// 获取文章评论
export function getComments(articleId) {
  return request({
    url: `/api/comments/article/${articleId}`,
    method: 'get'
  });
}

// 添加评论
export function addComment(data) {
  return request({
    url: '/api/comments',
    method: 'post',
    data
  });
}

// 删除评论
export function deleteComment(commentId) {
  return request({
    url: `/api/comments/${commentId}`,
    method: 'delete'
  });
}

// 点赞评论
export function likeComment(commentId) {
  return request({
    url: `/api/comments/${commentId}/like`,
    method: 'post'
  });
} 